// 
// Decompiled by Procyon v0.5.36
// 

package com.cyberfend.cyfsecurity;

import java.io.*;

final class u
{
    public static int a(final java.lang.String s) {
        if (s != null && !s.trim().equalsIgnoreCase("")) {
            try {
                int n = '\0';
                for (int i = 0; i < s.length(); ++i) {
                    final char char1;
                    if ((char1 = s.charAt(i)) < '\u0080') {
                        n += char1;
                    }
                }
                return n;
            }
            catch (java.lang.Exception ex) {
                return -2;
            }
        }
        return -1;
    }
    
    public static long b(final java.lang.String s) {
        long long1 = 0L;
        try {
            long1 = java.lang.Long.parseLong(s);
        }
        catch (java.lang.NumberFormatException ex) {}
        return long1;
    }
    
    public static boolean c(final java.lang.String s) {
        return s == null || s.trim().equals("");
    }
    
    public static java.lang.String d(final java.lang.String s) {
        try {
            final byte[] bytes = s.getBytes("UTF-8");
            final java.lang.StringBuffer sb = new java.lang.StringBuffer(bytes.length);
            for (int i = 0; i < bytes.length; ++i) {
                final byte b;
                if ((b = bytes[i]) < 33 || b > 126 || b == 34 || b == 37 || b == 39 || b == 44 || b == 92) {
                    sb.append('%');
                    char forDigit;
                    if (java.lang.Character.isLetter(forDigit = java.lang.Character.forDigit(b >> 4 & 0xF, 16))) {
                        forDigit -= ' ';
                    }
                    sb.append(forDigit);
                    char forDigit2;
                    if (java.lang.Character.isLetter(forDigit2 = java.lang.Character.forDigit(b & 0xF, 16))) {
                        forDigit2 -= ' ';
                    }
                    sb.append(forDigit2);
                }
                else {
                    sb.append((char)b);
                }
            }
            return sb.toString();
        }
        catch (java.io.UnsupportedEncodingException ex) {
            return "utf8-encode-err";
        }
    }
}
